﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Navigation;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using 多协议通信平台.Models;
using 多协议通信平台.ViewModels;

namespace 多协议通信平台.Base
{
    public partial class BaseViewModel : ObservableObject
    {
        [ObservableProperty]
        private string pageTitle;

        public RelayCommand<FrameworkElement> CloseViewCommand
        {
            get => new RelayCommand<FrameworkElement>(element =>
            {
                if (element == null) return;
                MainViewModel.TabList.Remove(element);
            });
        }
    }
}
